<template>
	<view class="box1" >
		<view  class="item" v-for="(item,index) in shops" :key="item.id">
			<checkbox></checkbox>
			<text >{{item.name}}</text>
			<button size="mini" type="warn" @click="remove(index)">删除</button>
		</view>
		
	</view>
</template>

<script setup>
	
import {ref} from "vue";
const shops =ref([
	{id:1,name:"xiaomi"},
	{id:2,name:"华为"},
	{id:3,name:"苹果"},
	{id:4,name:"oppo"},
])
function remove(key){
	console.log(key)
	shops.value.splice(key,1)
	
	
}

</script>

<style lang="scss" scoped>

</style>
